<cfcomponent>

	<cffunction name="login" access="remote" returntype="boolean">
		<cfargument name="tecnico" type="string" required="true"/>
		<cfargument name="senha" type="string" required="true"/>			
		
		<cfquery name="qUsuario" datasource="BRUST">
			SELECT
				TECNICO,
				SENHA
			FROM
				TECNICO
			WHERE
				TECNICO = <cfqueryparam cfsqltype="cf_sql_varchar" maxlength="20" value="#arguments.tecnico#"/>
				AND SENHA = <cfqueryparam cfsqltype="cf_sql_varchar" maxlength="20" value="#arguments.senha#"/>			
		</cfquery>
		
		<cflog text="qUsuario = #qUsuario.recordCount#" log="SLR" file="SLR"/>
		
		<cfif qUsuario.recordCount>
			<cfreturn true/>
		<cfelse>
			<cfreturn false/>
		</cfif>
		
	</cffunction>
	
	<cffunction name="logout" access="remote" returntype="boolean">
		<cflogout>
		<cfreturn true>
	</cffunction>
	
	<cffunction name="sendPasswordReminder" access="remote" returntype="boolean">
		<!--- 
			use <cfmail> to send a password reminder email.
		--->
		<cfreturn true>
	</cffunction>
	
	<!---
		Should return error, if not a sucess.
	 --->
	<cffunction name="register" access="remote">
		<cfreturn true>
	</cffunction>	
	
</cfcomponent>